Locate child at (border_width,border_width), not
authorOwen Taylor <otaylor@gtk.org>
Sat, 23 May 1998 21:55:40 +0000 (21:55 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 23 May 1998 21:55:40 +0000 (21:55 +0000)
Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>

* gtk/gtkeventbox.c (gtk_event_box_size_allocate):
        Locate child at (border_width,border_width), not
(2*border_width,2*border_width). [ The border is _outside_
widget->window ]

* gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
  functions. [From: Alexander Larsson <alla@lysator.liu.se> ]

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdk.c
gdk/gdk.h
gdk/x11/gdkmain-x11.c
gtk/gtkeventbox.c

index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index 978d0b01b2f2acd74f0f7b17e69bc80274ad75ef..9522faa1c3b1712cf74b24fc21b54d6232a2ab5e 100644 (file)
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkeventbox.c (gtk_event_box_size_allocate): 
+        Locate child at (border_width,border_width), not
+       (2*border_width,2*border_width). [ The border is _outside_
+       widget->window ]
+       
+       * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+         functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
 1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
        * gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
index c1b7073b675621e0cbf3a20d429395d04abf4c9c..78d979514e25f6241d351181975f58ef2e6874ca 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -1497,6 +1497,56 @@ gdk_screen_height (void)
   return return_val;
 }
 
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_width_mm
+ *
+ *   Return the width of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_width_mm (void)
+{
+  gint return_val;
+
+  return_val = DisplayWidthMM (gdk_display, gdk_screen);
+
+  return return_val;
+}
+
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_height
+ *
+ *   Return the height of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_height_mm (void)
+{
+  gint return_val;
+
+  return_val = DisplayHeightMM (gdk_display, gdk_screen);
+
+  return return_val;
+}
+
 void
 gdk_key_repeat_disable (void)
 {
index e80c838b989b243cee0250784937484f03c07e46..e9dbf5718f3dbc56628e87c9455b4831bf7f43e7 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -86,6 +86,9 @@ gint gdk_pointer_is_grabbed (void);
 gint gdk_screen_width  (void);
 gint gdk_screen_height (void);
 
+gint gdk_screen_width_mm  (void);
+gint gdk_screen_height_mm (void);
+
 void gdk_flush (void);
 void gdk_beep (void);
 
index c1b7073b675621e0cbf3a20d429395d04abf4c9c..78d979514e25f6241d351181975f58ef2e6874ca 100644 (file)
@@ -1497,6 +1497,56 @@ gdk_screen_height (void)
   return return_val;
 }
 
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_width_mm
+ *
+ *   Return the width of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_width_mm (void)
+{
+  gint return_val;
+
+  return_val = DisplayWidthMM (gdk_display, gdk_screen);
+
+  return return_val;
+}
+
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_height
+ *
+ *   Return the height of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_height_mm (void)
+{
+  gint return_val;
+
+  return_val = DisplayHeightMM (gdk_display, gdk_screen);
+
+  return return_val;
+}
+
 void
 gdk_key_repeat_disable (void)
 {
index d6d699d9ff566ea69d07e61c63d4ba1304efae66..9c3fbc10318fedd048324c41af38c124594755c6 100644 (file)
@@ -161,8 +161,8 @@ gtk_event_box_size_allocate (GtkWidget     *widget,
   widget->allocation = *allocation;
   bin = GTK_BIN (widget);
 
-  child_allocation.x = GTK_CONTAINER (widget)->border_width;
-  child_allocation.y = GTK_CONTAINER (widget)->border_width;
+  child_allocation.x = 0;
+  child_allocation.y = 0;
   child_allocation.width = MAX (allocation->width - GTK_CONTAINER (widget)->border_width * 2, 0);
   child_allocation.height = MAX (allocation->height - GTK_CONTAINER (widget)->border_width * 2, 0);